package com.neborosoft.FlyingDog.android.gui.adapters.listview;

import android.content.Context;
import android.view.View;
import android.widget.AbsListView;
import com.neborosoft.FlyingDog.R;
import com.neborosoft.android.gui.adapters.listview.TextViewArrayAdapter;
import com.neborosoft.lib.strings.Capitalizer;
import com.neborosoft.lib.strings.TransformingString;

/**
 * Created with IntelliJ IDEA.
 * User: CM
 * Date: 25.02.13
 * Time: 23:40
 * To change this template use File | Settings | File Templates.
 */
public class GenreListAdapter extends TextViewArrayAdapter{
    public GenreListAdapter(Context context, AbsListView parent) {
        super(context, parent);
    }

    @Override
    protected void reuseView(CharSequence text, View viewObject, int position) {
        CharSequence capitalized = new TransformingString(text, new Capitalizer());
        super.reuseView(capitalized, viewObject, position);
    }

    @Override
    protected int getRootLayoutId() {
        return R.layout.genre_list_item;
    }
}
